package com.enzoism.learn;

public class PersonService {

    private PersonProperties properties;

    public PersonService() {
    }

    public PersonService(PersonProperties properties) {
        this.properties = properties;
        System.out.println("------->构造方法：" + properties);
        this.sayHello();
        System.out.println("------->构造方法-打印结束：");
        System.out.println();
    }

    public void sayHello() {
        System.out.println("大家好，我叫: " + properties.getName() + ", 今年" + properties.getAge() + "岁"
                + ", 性别: " + properties.getSex());
    }
}

